#include "AbstractQuery.h"

/**
 *
 **/
AbstractQuery::AbstractQuery(PDatabase dbc, PString database, PString sqlQuery)
{
    this->dbc = dbc;
	this->database = database;
	this->sqlQuery = sqlQuery;
	this->current_row = 0;
	this->num_rows = 0;
	this->datarow = NULL;
}

/**
 *
 **/
AbstractQuery::~AbstractQuery()
{
	delete this->datarow;
}

/**
 *
 **/
bool AbstractQuery::hasMore() {
	delete this->datarow;
	this->datarow = new DataRow();
	return ( (this->current_row++) < this->num_rows );
}

/**
 *
 **/
size_t AbstractQuery::getNumRows(){
    return this->num_rows;
}
